package router

import (
	"fx_swift_forex/internal/controller"
	"fx_swift_forex/pkg/upload"
	"github.com/gin-gonic/gin"
)

var miniApiVer *gin.RouterGroup

func InitRouter(g *gin.Engine) {
	installController(g)
}

func installController(engine *gin.Engine) {
	miniApiVer = engine.Group("api/forex")

	miniApiVer.POST("register", controller.Register)
	miniApiVer.POST("login", controller.Login)
	miniApiVer.POST("forgetPassword", controller.ForgetPassword)

	miniApiVer.GET("sendMailCode", controller.SendMailCode)
	miniApiVer.GET("emailIsExit", controller.EmailIsExit)

	miniApiVer.POST("uploaderToS3", upload.UploadToS3)
	miniApiVer.POST("uploader", upload.BatchUpload)
	miniApiVer.POST("uploadFiles", controller.UploadComplyFiles)
	miniApiVer.GET("getForexCountryInfo", controller.GetForexCountryInfo)
	miniApiVer.GET("getProvinceInfo", controller.GetProvinceInfo)
	miniApiVer.GET("getCityInfo", controller.GetCityInfo)
	miniApiVer.GET("getCurrencies", controller.GetCurrencies)
	miniApiVer.GET("getPaymentInfo", controller.GetPaymentInfo)
	miniApiVer.GET("getPaymentPurposeInfo", controller.GetPaymentPurposeInfo)
	miniApiVer.GET("getIncomeSourceInfo", controller.GetIncomeSourceInfo)
	miniApiVer.GET("getCompanyType", controller.GetCompanyType)
	miniApiVer.GET("getBusinessType", controller.GetBusinessType)
	miniApiVer.GET("checkEmail", controller.CheckEmail)
	miniApiVer.GET("getStateOrProvinceInfo", controller.GetStateOrProvinceInfo)

	UserRouter()
	ComplyRouter()
	BeneficiaryRouter()
	PaymentRouter()
	ConvertRouter()
}
